/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved. 
 */
package com.icinfo.cloud.provider.punish.usersign.controller;

import com.icinfo.cloud.provider.punish.usersign.dto.MemberUserSignSaveDto;
import com.icinfo.cloud.provider.punish.usersign.service.IMemberUserSignService;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.web.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 【V1.3.2】描述: 用户签名信息前端控制器
 *
 * @author framework generator
 * @date 2022年07月21日
 */
@Slf4j
@RestController
@RequestMapping("/userSign")
public class MemberUserSignController extends BaseController {

    @Resource
    private IMemberUserSignService memberUserSignService;


    /**
     * 【V1.4.1】描述： 设置用户签名
     *
     * @author: zhengqiang
     * @date: 2022/7/21
     * @param: saveDto
     * @return {@link Result}
     **/
    @PostMapping(value = "/saveUserSign")
    public Result saveUserSign(@RequestBody @Validated MemberUserSignSaveDto saveDto) {
        return memberUserSignService.saveUserSign(saveDto);
    }

    /***
     * 描述： 设置当前用户token
     *
     * @author: zhengqiang
     * @date: 2022/9/8
     * @return {@link Result}
     **/
    @PostMapping(value = "/saveUserToken")
    public Result saveUserToken() {
        return memberUserSignService.saveUserToken();
    }


}